    /********************************************************/
    /*                                                      */
    /*                                                      */
    /*         Copyright (C), 1993  SEIKO EPSON Corp.       */
    /*         ALL RIGHTS RESERVED                          */
    /*                                                      */
    /*                                                      */
    /*  file name : ftell.c                                 */
    /*                                                      */
    /*  Revision history                                    */
    /*      93/12/17    first release       S.Akaiwa        */
    /*      97/3/17	modified	    T.Katahira	    */
    /*			change function declaration	    */
    /*					to the ANSI style   */
    /*                                                      */
    /********************************************************/

#ifdef      UNIX
#include    "stdio.h"
#include    "smcvals.h"
#else
#include    <stdio.h>
#include    <smcvals.h>
#include	<_mj_os.h>
#endif

long
ftell(FILE * fiStrmP)

    /********************************************************/
    /*                                                      */
    /*  This is dummy function.                             */
    /*  If stdin, stdout or stderr is specified by fiStrmP, */
    /*  the ftell function returns current file position 0. */
    /*  Otherwise, this function returns -1L.               */
    /*                                                      */
    /*      RETURN  0          ... Current position (0)     */
    /*              -1         ... Error                    */
    /*                                                      */
    /*  <ANSI>                                              */
    /*      The ftell function obtains current value of     */
    /*      the current file position.                      */
    /*                                                      */
    /*      RETURN  Except -1  ... Current file position    */
    /*              -1         ... Error                    */
    /*                                                      */
    /********************************************************/

    /* FILE    *fiStrmP    ;     pointer to target position */
    {

     if(_ISSTDIO(fiStrmP)){                 /* stream stdio */
        return  (long)0L;   /* return current file position */
     }
   
     else {                                        /* other */
		 FileTell(fiStrmP->_fd);
     }
    }

